// 接口——四则计算器
package JavaPractice;

import java.util.Scanner;

public class simple_calculation{
    public static void main(String args[]){
        Scanner reader = new Scanner(System.in);
        Sub suber = new Sub();
        Add adder = new Add();
        int m, n;
        n = reader.nextInt();
        m = reader.nextInt();
        System.out.println(adder.computer(n, m));
        System.out.println(suber.computer(n, m));
    }
}

interface ICompute{
    int computer(int n, int m);
}

class Add implements ICompute{
    public int computer(int n, int m){
        return m+n;
    }
}

class Sub implements ICompute{
    public int computer(int n, int m){
        return n-m;
    }
}